<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'basic';
$return=array();
if($_RQ['op']=='basic'){
	if($_RQ['postdata']){
		$postdata=get_postdata();
		$this->plugin_setting('fuwuset',$postdata);
		exi('设置成功');
	}
	$footernav =array(
		array('title'=>'站长中心','icon'=>'icon-shouye','action'=>'jy_ailiao/fuwu.index/'),
		array('title'=>'站长分润','icon'=>'icon-yiban','action'=>'jy_ailiao/fuwu.commission/'),
		array('title'=>'站长订单','icon'=>'icon-dingdan','action'=>'jy_ailiao/fuwu.order/'),
		array('title'=>'我的客户','icon'=>'icon-paihao0','action'=>'jy_ailiao/fuwu.down/'),
	);
	$return['item']=$this->plugin_setting('fuwuset');
	$return['item']['footernav']=$return['item']['footernav']?:$footernav;
	$htmls=array(
		'type'=>'edit',
		'desc'=>'参数设置',
		'edit_tab'=>true,
		'edits'=>array(
			array(
				'title'=>'基础设置',
				'list'=>array(
					array('type'=>'switch','title'=>'是否开启抽成','name'=>'isopen'),
					array('name'=>'tohong_per','title'=>'红娘抽成','type'=>'unitstring','unit'=>'%','help'=>'用户提现额*比例%(直接结算到红娘余额账户)'),
					array('type'=>'radio','title'=>'申请服务站长条件','name'=>'become','options'=>'become'),
					array('type'=>'checkbox','title'=>'服务站升级考核指标','name'=>'level_up_types','options'=>'leveltype'),					
				)
			),
			array(
				'title'=>'结算设置',
				'list'=>array(
					array('type'=>'string','title'=>'分润打款手续费（%）','name'=>'balance_per'),
					array('type'=>'string','title'=>'免手续费提现区间开始金额','name'=>'balance_money_start'),
					array('type'=>'string','title'=>'免手续费提现区间结束金额','name'=>'balance_money_end','help'=>'当提现手续费金额在此区间内时,不扣除提现手续费. 结束金额 必须大于 开始金额才能生效'),
					array('type'=>'string','title'=>'结算天数','name'=>'balance_day','help'=>'当订单完成后的n天后，订单才能申请结算,设置0或空，订单完成就可以结算'),
				),
			),
			array(
				'title'=>'底部导航',
					'list'=>array(
									array('type'=>'array','name'=>'footernav','add_tip'=>'添加一个底部导航',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),							
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标','help'=>'图标，例如：icon-shouye'),							
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'导航链接'),
									)
								),
					)
			),
		)
	);
	$return['leveltype']=$this->level_up_types;
	$return['agent_types']=$this->agent_types;
	$return['commissiontype']=$this->commission_types;
	$return['commissiontypes']=$this->commission_types2;
	$return['become']=array('1'=>'后台指定','2'=>'申请');
	$return['level']=$this->level_types;
	$return['htmls']=$htmls;
	exi($return);
}


